Error bound formula for midpoint rule